<?php

namespace App\Library\Requests\Product;

use App\Library\Requests\Base\BaseDTORequest;

class TjRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            'startAt' => 'nullable|date|date-format:Y-m-d',
            'endAt' => 'nullable|date|date-format:Y-m-d|after_or_equal:startAt',
            'productName' => 'nullable|string|max:255'
        ];
    }

    public function messages(): array
    {
        return [
            'endAt.after' => __('errorCode.626')
        ];
    }
}
